import { defineStore } from "pinia";

const usePsyBusinessStore = defineStore(
    'psyBusiness',
    () => {
        const chosenBusiness = ref(null)
        const businessList = ref([])

        /** 设置业务列表 */
        function setBusinessList(businessList) {
            businessList.value = businessList
            console.log("设置业务列表", businessList.value)
        }

        /** 选择业务 */
        function selectBusiness(business) {
            chosenBusiness.value = business
            console.log("选择业务", chosenBusiness.value)
        }
        
        return {
            chosenBusiness,
            businessList,
            setBusinessList,
            selectBusiness
        }
    }
)

export default usePsyBusinessStore